package com.zmn.oms.common.constant;

import com.google.common.collect.Lists;
import com.zmn.common.dictionary.DictModel;

import java.util.List;

/**
 * 类描述：工单预约状态
 *
 * @author heciqi
 * @date 2020/4/17 10:23
 */
public class OrderDutyConsts {

    /**
     * 默认状态
     */
    public final static int DUTY_STATUS_NONE = 0;

    /**
     * 预约挂起
     */
    public final static int DUTY_STATUS_SUSPEND = 1;

    /**
     * 预约成功
     */
    public final static int DUTY_STATUS_SUCCESS = 2;

    /**
     * 预约失败
     */
    public final static int DUTY_STATUS_FAIL = 3;

    /**
     * 预约失败code
     */
    public final static int DUTY_FAIL_CODE_ONE = 1;
    public final static int DUTY_FAIL_CODE_TWO = 2;
    public final static int DUTY_FAIL_CODE_THREE = 3;
    public final static int DUTY_FAIL_CODE_FOUR = 4;
    public final static int DUTY_FAIL_CODE_FIVE = 5;
    public final static int DUTY_FAIL_CODE_SIX = 6;
    public final static int DUTY_FAIL_CODE_SEVEN = 7;
    public final static int DUTY_FAIL_CODE_EIGHT = 8;
    public final static int DUTY_FAIL_CODE_NINE = 9;
    public final static int DUTY_FAIL_CODE_TEN = 10;
    public final static int DUTY_FAIL_CODE_ELEVN = 11;
    public final static int DUTY_FAIL_CODE_TWELVE = 12;
    public final static int DUTY_FAIL_CODE_THIRTEEN = 13;
    public final static int DUTY_FAIL_CODE_FOURTEEN = 14;
    public final static int DUTY_FAIL_CODE_FIVTEEN = 15;
    public final static int DUTY_FAIL_CODE_SIXTEEN = 16;

    /**
     * 预约失败原因
     *
     * @return
     */
    public static List<DictModel> getDutyFailReasonList() {
        List<DictModel> items = Lists.newArrayListWithExpectedSize(7);
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_ONE, "客户无法确认服务时间"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_TWO, "电话无人接听"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_THREE, "未到货"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FOUR, "装修周期未到"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FIVE, "电话关机/无法接通"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_SIX, "用户电话有误（提示电话错/空号/停机)"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_SEVEN, "用户电话有误（接通用户表示打错了，没有要服务的产品)"));
        return items;
    }


    /**
     * 预约失败原因
     *
     * @param reasonCode
     * @return
     */
    public static String getDutyFailedReasonName(Integer reasonCode) {
        switch (reasonCode) {
            case OrderDutyConsts.DUTY_FAIL_CODE_ONE:
                return "客户无法确认服务时间";
            case OrderDutyConsts.DUTY_FAIL_CODE_TWO:
                return "电话无人接听";
            case OrderDutyConsts.DUTY_FAIL_CODE_THREE:
                return "未到货";
            case OrderDutyConsts.DUTY_FAIL_CODE_FOUR:
                return "装修周期未到";
            case OrderDutyConsts.DUTY_FAIL_CODE_FIVE:
                return "电话关机/无法接通";
            case OrderDutyConsts.DUTY_FAIL_CODE_SIX:
                return "用户电话有误（提示电话错/空号/停机)";
            case OrderDutyConsts.DUTY_FAIL_CODE_SEVEN:
                return "用户电话有误（接通用户表示打错了，没有要服务的产品)";
            default:
                return "客户无法确认服务时间";
        }
    }

    /**
     * 挂起原因
     *
     * @return
     */
    public static List<DictModel> getDutySuspendReasonList() {
        List<DictModel> items = Lists.newArrayListWithExpectedSize(16);
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_ONE, "客户无法确认服务时间"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_TWO, "电话无人接听"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_THREE, "未到货"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FOUR, "装修周期未到"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FIVE, "电话关机/无法接通"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_SIX, "用户电话有误（提示电话错/空号/停机)"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_SEVEN, "用户电话有误（接通用户表示打错了，没有要服务的产品)"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_EIGHT, "不符合服务条件"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_NINE, "商品问题"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_TEN, "客户更改时间"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_ELEVN, "工期长未完工"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_TWELVE, "无法核销"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_THIRTEEN, "其他原因"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FOURTEEN, "待客户退款"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_FIVTEEN, "暂时不需要安装"));
        items.add(new DictModel(OrderDutyConsts.DUTY_FAIL_CODE_SIXTEEN, "长期（15天以上）待件"));
        return items;
    }

    /**
     * 预约失败原因
     *
     * @param reasonCode
     * @return
     */
    public static String getDutySuspendReasonName(Integer reasonCode) {
        switch (reasonCode) {
            case OrderDutyConsts.DUTY_FAIL_CODE_ONE:
                return "客户无法确认服务时间";
            case OrderDutyConsts.DUTY_FAIL_CODE_TWO:
                return "电话无人接听";
            case OrderDutyConsts.DUTY_FAIL_CODE_THREE:
                return "未到货";
            case OrderDutyConsts.DUTY_FAIL_CODE_FOUR:
                return "装修周期未到";
            case OrderDutyConsts.DUTY_FAIL_CODE_FIVE:
                return "电话关机/无法接通";
            case OrderDutyConsts.DUTY_FAIL_CODE_SIX:
                return "用户电话有误（提示电话错/空号/停机)";
            case OrderDutyConsts.DUTY_FAIL_CODE_SEVEN:
                return "用户电话有误（接通用户表示打错了，没有要服务的产品)";
            case OrderDutyConsts.DUTY_FAIL_CODE_EIGHT:
                return "不符合服务条件";
            case OrderDutyConsts.DUTY_FAIL_CODE_NINE:
                return "商品问题";
            case OrderDutyConsts.DUTY_FAIL_CODE_TEN:
                return "客户更改时间";
            case OrderDutyConsts.DUTY_FAIL_CODE_ELEVN:
                return "工期长未完工";
            case OrderDutyConsts.DUTY_FAIL_CODE_TWELVE:
                return "无法核销";
            case OrderDutyConsts.DUTY_FAIL_CODE_THIRTEEN:
                return "其他原因";
            case OrderDutyConsts.DUTY_FAIL_CODE_FOURTEEN:
                return "待客户退款";
            case OrderDutyConsts.DUTY_FAIL_CODE_FIVTEEN:
                return "暂时不需要安装";
            case OrderDutyConsts.DUTY_FAIL_CODE_SIXTEEN:
                return "长期（15天以上）待件";
            default:
                return "";
        }
    }

}